package me.zhyx.service.impl;

import me.zhyx.dao.UserMapper;
import me.zhyx.entity.User;
import me.zhyx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserService {
    @Autowired
   private UserMapper userMapper;


    @Override
    public User getUserById(Integer userId) {
        return userMapper.selectByPrimaryKey(userId);
    }

    @Override
    public Integer insertUser(User user) {
        int insert = userMapper.insert(user);
        return insert;
    }
}
